{*include file="template/admin_head.htm"*}
<table id="containtable" cellspacing="0" cellpadding="0" class="{*$cf_controller*}">
    <tr>
        <td width="1979" valign="top" bgcolor="#FFFFFF">


            <div class="wrapper pr_8">
                {*if $cf_action=='add' || $cf_action=='edit'*}             

                <div class="content_panel_title">
                    <div class="contentpanelleft"></div>
                    <div class="contentpanelcenter">
                        <span class="contentpanelcenter_font">新增/修改用户资料</span>
                        <span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">用户管理</a></span>                            </div>
                    <div class="contentpanelrihgt"></div>
                </div>
                <div class="content_table_center_style">
                    <div class="p8">

                        <form name="action_form" id="action_form" method="post" action="{*$cf_self_page*}">
                            <input name="id" id="id" type="hidden" value="{*$row['user_id']*}" />
                            <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                            <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
                                <tbody>
                             
                                    <tr>
                                        <td colspan="4" class="stitle">账户信息</td>
                                    </tr>
                                    <tr>
                                      <td width="11%" align="right">新密码:</td>
                                      <td width="32%" align="left"><input name="user_pwd_new"  id="user_pwd_new" type="password" value="" size="30" maxlength="20" autocomplete='off' /></td>
                                      <td width="16%" align="right">确认新密码:</td>
                                      <td width="41%" align="left"><input name="user_pwd_new2" type="password" id="user_pwd_new2" value="" size="30" maxlength="20" autocomplete='off' /></td>
                                    </tr>
                                    <tr>
                                      <td align="right">登录次数:</td>
                                      <td align="left">{*$row['user_login_count']*}</td>
                                      <td align="right">最后登录:</td>
                                      <td align="left">{*$row['user_last_login']*}</td>
                                    </tr>                                
									<tr>
										<td align="right">注册时间:</td>
										<td align="left">{*$row['user_reg_time']*}</td>
										<td align="right">更新时间:</td>
										<td align="left">{*$row['user_edit_time']*}</td>
									</tr>
                                </tbody>
                            </table>
<div class="pt_8" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                &nbsp;&nbsp;
                          <input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></div>
                      </form>
                    </div>
                </div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>
               
               
                {*else*}
				<script type="text/javascript">
				$(function(){
					$("#skey").autocomplete("/admin/ajax-act_searchuser.htm", {
						minChars: 1,					//最少输入字条
						max: 12,
						autoFill: false,				//是否选多个,用","分开
						mustMatch: true,				//是否全匹配, 如数据中没有此数据,将无法输入
						matchContains: true,			//是否全文搜索,否则只是前面作为标准
						scrollHeight: 220,
						width:500,
						multiple:false,
						dataType:'html',
						formatItem: function(row, i, max) {					//显示格式						
							return "<span style='width:120px'>"+row[0]+"</span><span style='width:70px'>ID:"+row[1]+"</span><span style='width:200px'>"+row[2]+"</span><span style='width:40px'>"+row[3]+"</span>";
						},
						formatMatch: function(row, i, max) {				//以什么数据作为搜索关键词,可包括中文,
						   return row[1];
				
						},
						formatResult: function(row) {					//返回结果		
							return row[0];
						}
					});

                    //省市联动
                    load_province('area','{*$province*}','{*$city*}');
                    load_province('cate','{*$cate1*}','{*$cate2*}');
                    $("#province").change(function(){                                   //更改省份
                        change_province('area',$(this).val());
                    });
                    $("#cate1").change(function(){                                   //更改分类
                        change_province('cate',$(this).val());
                    });

                    $("#reset_search").click(function(){
                        $("#skey").val("");
                        $("#date").val("");
                        $("#stype option:first").attr("selected","selected");
                        $("#province option:first").attr("selected","selected");
                        $("#cate1 option:first").attr("selected","selected");
                        $("#cate2 option:first").attr("selected","selected");
                        $("#city option:first").attr("selected","selected");
                    });
					
					$(".tips").bstip();
					
				})
				
				
				</script>
             
                <div class="pannel">
                    <div class="pl"></div>
                    <div class="pr"></div>
                    <div class="pc1">
                    <form action="" method="get" id="search_form" name="search_form">
                        <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                        <input name="self" id="self" type="hidden" value="{*$self*}" />
                        <div class="pt">账号:
				    		<input type="text" size="12" id="skey" name="skey" class="tet" value="{*$skey*}" />&nbsp;&nbsp;
				    <!--手机:<input type="text" size="12" id="skey2" name="skey2" class="tet" value="{*$skey2*}" />-->
				    &nbsp;&nbsp;
					注册时间:
                    <input name="skey3" class="Wdate" type="text" id="act_start" value="{*$skey3*}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,readOnly:true});" size="13" maxlength="30" />
                   
                          <!--  地区:
                          <select name="province" id="province">
                                <option value='' selected="selected">请选择省份</option>
                                <option value='0' >全国</option>
                            </select>

                            <select name="city" id="city" disabled="disabled" style="display:none">
                                <option value='' selected="selected">请选择城市</option>

                            </select>
				
										
                            &nbsp;&nbsp;
                    渠道号:<input name="skey4" type="text" id="skey4" size="10" value="{*$skey4*}" /> -->      
                    <input type="image" src="public/images/admin/icon_search_btn.gif">
                        </div>
                    </form>
                </div>
                </div>
                <div class="content_panel_title">
                    <div class="contentpanelleft"></div>
                    <div class="contentpanelcenter">
                        <span class="contentpanelcenter_font">用户资料管理</span>
                        <!--<span><a class="edit at" href="{*$cf_self_path*}-act_add.htm?dpt={*$cf_dpt*}">新增掌友</a></span>-->
                 </div>
                    <div class="contentpanelrihgt"></div>
                </div>
                <div class="content_table_center_style">
                    <div class="p8">
					<div class="bq clearfix">
                            <b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}" class="{*if $self==''*}active{*/if*}">所 有 </a></b>
							{*foreach $cf_info_var_common['user_status'] as $key=>$item*}
							{*if $key==$self && $self!=''*}
							{*assign var=class value='active'*}
							{*else*}
							{*assign var=class value=''*}
							{*/if*}
							<b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}&self={*$key*}" class="{*$class*}" >{*$item*}</a></b>
							{*/foreach*}
							
							
							</div>
                      <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
                          <input name="act" type="hidden" value="all" />
                            <input name="dpt" type="hidden" value="{*$cf_dpt*}" />
                            <table width="100%" class="tbl tbl_nbr">
                                <thead>
                                    <tr class="thd">
                                    <td width="6%" align="center" class="thr">ID</td>
                                    <td width="22%" align="center" class="thr">账号</td>
                                    <td width="14%" align="center" class="thr">登录次数</td>
                                    <td width="13%" align="center" class="thr">注册时间</td>
                                    <td width="11%" align="center" class="thr">注册ip</td>
                                    <td width="9%" align="center" class="thr">状态</td>
                                    <td colspan="3" align="center" class="thr">操作</td>
                                    </tr>
                                </thead>
                                <tbody>
                                {*foreach $data_ary as $item*}
							

                                <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
                                    <td align="left">{*$item['user_id']*}</td>
                                    <td align="left"><a href="javascript:void(0)" title="查看詳情" onclick="$(function(){my_iframe('{*$cf_module_path*}detail-act_user.htm?id={*$item['user_id']*}','查看用户详情',700,500)})" class="edit" >{*$item['user_name']*}</a></td>
                                    <td align="center">{*$item['user_login_count']*}</td>
                                  <td align="center">{*$item['user_reg_time']*}</td>
                                  <td align="center">{*$item['user_reg_ip']*}</td>
                                  <td align="center">{*$cf_info_var_common['user_status'][$item['user_status']]*}</td>
                                    <td width="7%" align="center"><a href="/admin/order.htm?dpt=7&skey6={*$item['user_name']*}" target="__blank" class="edit">订单列表</a></td>
                                    <td width="4%" align="center"><a href="javascript:void(0)" title="查看詳情" onclick="$(function(){my_iframe('{*$cf_module_path*}detail-act_user.htm?id={*$item['user_id']*}','查看用户详情',700,500)})" class="edit" >查看</a></td>
                                    <td width="3%" align="center"><a href="{*$cf_module_path*}user-act_del.htm?id={*$item['user_id']*}" title="删除用户" class="del" onclick="return confirm('你确定要删除吗？')" >删除</a></td>
                                    </tr>

                                {*/foreach*}
                                  

                                    <tr class="tft">
                                        <td colspan="9" style="padding:0;">
                                            <table width="100%" border="0">
                                                <tr>
                                                    <td width="6%" align="center" style="border:0;padding:0;"><!--<input type="button" name="checkall" id="checkall" class="myinput" value="全 选" />--></td>
                                                    <td width="22%" align="center" style="border:0;padding:0;">
                                                        <!--<select name="alltype" id="alltype">
                                                            <option selected="selected" value="">操作選擇</option>
                                                            <option value="allcheck">通過審核</option>
                                                            <option value="alloutcheck">審核不通過</option>
                                                        </select>
                                                        &nbsp;<input type="submit" name="submit_all" id="submit_all" value="批量操作" class="myinput" />--></td>
                                                    <td width="72%" style="border:0;padding:0;" ><div class="turnPage"><p>{*$page*}</p></div></td>
                                                </tr>
                                            </table>                                </td>
                                    </tr>
                                </tbody>
                            </table>
                      </form>
                  </div>
                </div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>

                {*/if*}
            </div>        </td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}